﻿

using IotContract.Dtos.Remotes.Request;
using IotContract.Enums;
using IotContract.Models.Process;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Interfaces.Process;
/// <summary>
/// 对外提供进程调度数据
/// </summary>
public interface IProcessOpenProvider
{
    /// <summary>
    /// 获取物流线数据
    /// </summary>
    /// <returns></returns>
    List<ProcessBaseData> GetUnitCVs();

    /// <summary>
    /// 获取堆垛机数据
    /// </summary>
    /// <returns></returns>
    List<ProcessBaseData> GetStackers();

    /// <summary>
    /// 添加任务
    /// </summary>
    /// <param name="job"></param>
    /// <param name="type">任务类型 2:入库 3:出库 4:移库 5:充放电</param>
    /// <returns>错误消息，为空成功</returns>
    string AddJob(ProcessBaseData job, ProcessProviderType type);


    /// <summary>
    /// 删除任务
    /// </summary>
    /// <param name="job"></param>
    /// <param name="type"></param>
    /// <returns></returns>
    string RemoveJob(ProcessBaseData job, ProcessProviderType type);
   


    /// <summary>
    /// 1入库，2出库，3移库
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    List<ProcessBaseData> GetJobs(ProcessProviderType type);

    /// <summary>
    /// 完成任务
    /// </summary>
    /// <param name="fmsJobCompleteRequest"></param>
    /// <returns></returns>
    Task<string> CompleteJob(FmsJobCompleteRequest fmsJobCompleteRequest);


    /// <summary>
    /// 执行相关数据
    /// </summary>
    /// <param name="job"></param>
    /// <param name="type"></param>
    Task ExecuteData(ProcessBaseData job, ProcessProviderType type);

    /// <summary>
    /// 根据类型获取其它设备数据
    /// </summary>
    /// <param name="iotEquipType"></param>
    /// <returns></returns>
    List<ProcessBaseData> GetOthers(IotEquipType iotEquipType);
}
